﻿<PageFunction
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib" 
    xmlns:res="clr-namespace:Caps.Console.My.Resources"
    xmlns:tc="clr-namespace:Tools.WindowsT.WPF.ConvertersT;assembly=Tools.Windows"
    xmlns:convertersT="clr-namespace:Tools.WindowsT.WPF.ConvertersT;assembly=Tools.Windows"
    x:Class="pgImageStorage"
    x:TypeArguments="sys:Boolean"
    xmlns:my="clr-namespace:Caps.Console"
    KeepAlive="True"
    WindowTitle="{x:Static res:Resources.wiz_txt_ImageStorageSelection}"
>
    <FrameworkElement.Resources>
        <my:OrBooleanConverter x:Key="OrBooleanConverter"/>
        <my:AndBooleanConverter x:Key="AndBooleanConverter"/>
        <convertersT:EnumInConverter x:Key="EnumInConverter"/>
        <convertersT:NotVisibilityConverter x:Key="NotVisibilityConverter"/>
        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
        <tc:NotBooleanValueConverter x:Key="NotBooleanValueConverter"/>
      </FrameworkElement.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10" />
            <ColumnDefinition />
            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="10" />
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="10" />
        </Grid.RowDefinitions>

        <TextBlock Grid.Column="1" Grid.Row="1" Text="{x:Static res:Resources.wiz_txt_SelectImageStorage}" TextWrapping="Wrap"/>

        <Label Grid.Row="2" Grid.Column="1" Content="{x:Static res:Resources.wiz_txt_CannotChangeImageStorage}" Visibility="{Binding ImageStorageSettingsVisible, Converter={StaticResource NotVisibilityConverter}, Mode=OneWay}"/>
        <Grid Grid.Row="2" Grid.Column="1" Visibility="{Binding ImageStorageSettingsVisible, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <CheckBox Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Name="chkCapImages" IsChecked="{Binding CapImagesInDb, Mode=TwoWay}">
                <TextBlock Text="{x:Static res:Resources.wiz_txt_CapImagesInDB}" TextWrapping="Wrap" />
            </CheckBox>
            <CheckBox Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Name="chkOtherImages" IsChecked="{Binding OtherImagesInDb, Mode=TwoWay}">
                <TextBlock Text="{x:Static res:Resources.wiz_txt_OtherImagesInDB}" TextWrapping="Wrap" />
            </CheckBox>
            <Label Grid.Column="0" Grid.Row="2" Content="{x:Static res:Resources.txt_ImageRoot}" HorizontalAlignment="Right" VerticalAlignment="Center" Name="lblImageRoot" IsEnabled="{Binding ImageRootRequired, Mode=OneWay}"/>
            <TextBox Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" Name="txtImageRoot" Text="{Binding ImageRoot, Mode=TwoWay}" IsEnabled="{Binding ImageRootRequired, Mode=OneWay}" Margin="0,2" />
            <Button Grid.Column="2" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Name="btnImageRoot" Content="{x:Static res:Resources.cmd_Browse}" ToolTip="{x:Static res:Resources.tot_Browse}" IsEnabled="{Binding ImageRootRequired, Mode=OneWay}"/>
        </Grid>

        <TextBlock Grid.Row="3" Grid.Column="1" Text="{x:Static res:Resources.wiz_txt_MoreDetailedImageConfig}" TextWrapping="Wrap"/>

        <StackPanel Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,10,0,0">
            <Button Name="backButton" Click="backButton_Click" Padding="5,0,5,0" xml:space="preserve" Content="{x:Static res:Resources.wiz_cmd_Back}"/>
            <Button Name="nextButton" IsEnabled="True" Padding="5,0,5,0" Margin="10,0,0,0" xml:space="preserve" Content="{x:Static res:Resources.wiz_cmd_Next}"/>
            <Button Name="cancelButton" Click="cancelButton_Click" Padding="5,0,5,0" Margin="10,0,0,0" IsCancel="True" Content="{x:Static res:Resources.wiz_cmd_Cancel}"/>
            <Button Name="finishButton" Click="finishButton_Click" Padding="5,0,5,0" Margin="10,0,0,0" IsDefault="True" IsEnabled="False" Content="{x:Static res:Resources.wiz_cmd_Finish}"/>
        </StackPanel>
    </Grid>
</PageFunction>